package model

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"size:16;not null;unique"`
	Password MPassword `gorm:"size:100;not null"`
	Telephone string `gorm:"size:11"`
	Address string `gorm:"size:100"`
	Money float64 `gorm:"not null;default:0"`
	Orders []Order
}

func (u User) Id() uint {
  return u.ID
}
